

#pragma once

#ifndef  __RADISKCORE_H__
#define __RADISKCORE_H__


#define RADISKCORENAME TEXT("RADiskCore.dll")

#define INI_FUNC_ADDR(pFUNC,FUNC,HMOD,NAME) { pFUNC = (FUNC)GetProcAddress(m_hMod,NAME); }


class CRADiskCore
{

public:
	static DWORD InitAtaSmart();
	static DWORD GetAllDiskCount();
	static DWORD GetFirmwareRev(int iIndex, LPCWSTR* ppFirmwareRev);
	static DWORD GetSerialNumber(int iIndex, LPCWSTR* ppSerialNumber);
	static DWORD GetHostWrites(int iIndex, LPDWORD pdwWrites);
	static DWORD GetHostReads(int iIndex, LPDWORD pdwReads);
	static DWORD GetPowerOnCount(int iIndex, LPDWORD pdwPowerCount);
	static DWORD GetPowerOnHours(int iIndex, LPDWORD pdwPowerHours);
	static DWORD GetInterface(int iIndex, LPCWSTR* ppInterface);
	static DWORD GetMajorVersion(int iIndex, LPCWSTR* ppMajorVersion);
	static DWORD GetMinorVersion(int iIndex, LPCWSTR* ppMinorVersion);
	static DWORD GetCurTransMode(int iIndex, LPCWSTR* ppCurTransMode);
	static DWORD GetCurMaxMode(int iIndex, LPCWSTR* ppCurMaxMode);
	static DWORD IsSSD(int iIndex, PBOOL pbIsssd);
	static DWORD GetTemperature(int iIndex, LPDWORD pdwTemperature);
	static DWORD GetLife(int iIndex, LPDWORD pdwLife);
	static DWORD GetSupportMode(int iIndex, LPCWSTR* ppSupportMode);
	static DWORD GetModelSerial(int iIndex, LPCWSTR* ppModelSerial);
	static DWORD GetDriverMap(int iIndex, LPCWSTR* ppModelSerial);
	static DWORD GetTotalDiskSize(int iIndex, LPDWORD pdwTotalSize);
	static DWORD GetAttributeCount(int iIndex, LPDWORD pdwAttributeCount);
	static DWORD GetAttributeData(int iIndex, DWORD dwAttributeIndex, LPCWSTR* ppAttributeName, LPCWSTR* ppAttributeVal);
	static DWORD StartDiskTRIM(int iIndex);
	static DWORD StartDiskOverWriting(int iIndex);
	static DWORD GetSystemTime(LPCWSTR* ppSystemTime);
	static DWORD GetSystemName(LPCWSTR* ppSystemName);
	static DWORD GetSystemCurLanguage(LPCWSTR* ppSysLanguage);
	static DWORD GetOsCreater(LPCWSTR* ppOsCreater);
	static DWORD GetBiosVersion(LPCWSTR* ppBiosVersion);
	static DWORD GetOsType(LPCWSTR* ppOsType);
	static DWORD GetCPUMsg(LPCWSTR* ppCPUMsg);
	static DWORD GetMemoryMsg(LPCWSTR* ppMemMsg);
	static DWORD GetMainBoardMsg(LPCWSTR* ppMainBoardMsg);
	static DWORD GetWorkGroup(LPCWSTR* ppWorkGroup);


public:
	static BOOL Initialize();
	static BOOL Uninitialize();


protected:
	static BOOL m_bInit;
	static HMODULE m_hMod;

};

#endif // ! __RADISKCORE_H__

